

from prtg_sensors_api.clients.http import HttpPushDataAdvancedClient

__all__ = ["HttpIotPushDataAdvancedClient"]


class HttpIotPushDataAdvancedClient(HttpPushDataAdvancedClient):
    """
    HTTP IoT Push Data Advanced client.
    """

    _user_agent = "Paessler AG - PRTG HTTP IoT Push Data Advanced Client"

    def __init__(
            self, host, port, token, check_hostname=False, allow_self_signed_cert=False
    ):
        """
        Creates a new instance of the HTTP IoT Push Data Advanced Client.

        @param host: PRTG host name or IP address.
        @type host: str
        @param port: Port number of the target sensor.
        @type port: int or str
        @param token: The PRTG Sensor Token.
        @type token: str
        @param check_hostname: True, when the target host name shall
                               be verified against its certificate
                               upon connection, False, when the target's
                               host name doesn't need to match its
                               certificate. Default is False.
        @type check_hostname: bool
        @param allow_self_signed_cert: True to allow self-signed certificates,
                                       False to enforce a valid certificate
                                       chain. Default is False.
        @type allow_self_signed_cert: bool
        """
        super().__init__(host, port, token, use_ssl=True, check_hostname=check_hostname,
                         allow_self_signed_cert=allow_self_signed_cert)
